#include<stdio.h>
int main()
{
	int n = 1;
	float num = 0;
	
	for (n = 1; n <= 100; n++)
	{
		float i = 1.0 / n;
		if (n % 2 == 0)
		{
			i =- 1.0 / n;
			num = num + i;
		}
		else
		{
			num = num + i;
		}
	}
	printf("num=%f", num);
	return 0;
}